<template>
    <van-nav-bar title="详情" />
    <van-tabs v-model:active="active">
        <van-tab title="内容">
            <swiper :list="list.pics"></swiper>
            <div>{{ list.goods_name }}</div>
            <div style="color: red;">{{ list.goods_price }}$</div>
        </van-tab>
        <van-tab title="详情">
            <div>{{ list.goods_introduce }}</div>
        </van-tab>
        <van-tab title="评论">内容 3</van-tab>
    </van-tabs>

</template>

<script setup>
import { ref } from 'vue';
import { detailApi } from '@/api/api';
import swiper from '@/components/swiper.vue';
import { useRoute, useRouter } from 'vue-router'

const router = useRouter()
const route = useRoute()

let goods_id = ref(route.query.goods_id)

let list = ref([])
const deta = () => {
    detailApi(goods_id.value).then((res) => {
        list.value = res.data.message
    })
}
deta()
</script>

<style lang="scss" scoped></style>